
var app = getApp()
var service = require('../../util/service')
Page({
    data: {
        current: '',
        position: '',
        recent: [],
        li: [],
        fons:[],
        scrollId: '',
        showSarch:false,
        sarchCitys:[],
        citys: [
  { cityName: '阿克苏', cityPinYin: 'akesu', cityPY: 'aks',key:'A',hot:false
  },
  { cityName: '安康', cityPinYin: 'ankang', cityPY: 'ak',key:'A',hot: false
  },
  { cityName: '安陆', cityPinYin: 'anlu', cityPY: 'al',key:'A',hot: false
  },
  { cityName: '安庆', cityPinYin: 'anqing', cityPY: 'aq',key:'A',hot: false
  },
  { cityName: '鞍山', cityPinYin: 'anshan', cityPY: 'as',key:'A',hot: false
  },
  { cityName: '安顺', cityPinYin: 'anshun', cityPY: 'as',key:'A',hot: false
  },
  { cityName: '安阳', cityPinYin: 'anyang', cityPY: 'ay',key:'A',hot: false
  },
  { cityName: '白城', cityPinYin: 'baicheng', cityPY: 'bc',key:'B',hot: false
  },
  { cityName: '蚌埠', cityPinYin: 'bangbu', cityPY: 'bb',key:'B',hot: false
  },
  { cityName: '保定', cityPinYin: 'baoding', cityPY: 'bd',key:'B',hot: false
  },
  { cityName: '宝鸡', cityPinYin: 'baoji', cityPY: 'bj',key:'B',hot: false
  },
  { cityName: '包头', cityPinYin: 'baotou', cityPY: 'bt',key:'B',hot: false
  },
  { cityName: '鲅鱼圈', cityPinYin: 'bayuquan', cityPY: 'byq',key:'B',hot: false
  },
  { cityName: '巴中', cityPinYin: 'bazhong', cityPY: 'bz',key:'B',hot: false
  },
  { cityName: '北戴河', cityPinYin: 'beidaihe', cityPY: 'bdh',key:'B',hot: false
  },
  { cityName: '北海', cityPinYin: 'beihai', cityPY: 'bh',key:'B',hot: false
  },
  { cityName: '北京', cityPinYin: 'beijing', cityPY: 'bj',key:'B',hot: true
  },
  { cityName: '博乐', cityPinYin: 'bole', cityPY: 'bl',key:'B',hot: false
  },
  { cityName: '苍南', cityPinYin: 'cangnan', cityPY: 'cn',key:'C',hot: false
  },
  { cityName: '沧州', cityPinYin: 'cangzhou', cityPY: 'cz',key:'C',hot: false
  },
  { cityName: '常德', cityPinYin: 'changde', cityPY: 'cd',key:'C',hot: false
  },
  { cityName: '常州', cityPinYin: 'changzhou', cityPY: 'cz',key:'C',hot: false
  },
  { cityName: '巢湖', cityPinYin: 'chaohu', cityPY: 'ch',key:'C',hot: false
  },
  { cityName: '潮州', cityPinYin: 'chaozhou', cityPY: 'cz',key:'C',hot: false
  },
  { cityName: '承德', cityPinYin: 'chengde', cityPY: 'cd',key:'C',hot: false
  },
  { cityName: '成都', cityPinYin: 'chengdou', cityPY: 'cd',key:'C',hot: false
  },
  { cityName: '郴州', cityPinYin: 'chenzhou', cityPY: 'cz',key:'C',hot: false
  },
  { cityName: '赤壁', cityPinYin: 'chibi', cityPY: 'cb',key:'C',hot: false
  },
  { cityName: '赤峰', cityPinYin: 'chifeng', cityPY: 'cf',key:'C',hot: false
  },
  { cityName: '滁州', cityPinYin: 'chuzhou', cityPY: 'cz',key:'C',hot: false
  },
  { cityName: '大理', cityPinYin: 'dali', cityPY: 'dl',key:'D',hot: false
  },
  { cityName: '大连', cityPinYin: 'dalian', cityPY: 'dl',key:'D',hot: false
  },
  { cityName: '丹东', cityPinYin: 'dandong', cityPY: 'dd',key:'D',hot: false
  },
  { cityName: '大庆', cityPinYin: 'daqing', cityPY: 'dq',key:'D',hot: false
  },
  { cityName: '大同', cityPinYin: 'datong', cityPY: 'dt',key:'D',hot: false
  },
  { cityName: '达州', cityPinYin: 'dazhou', cityPY: 'dz',key:'D',hot: false
  },
  { cityName: '德令哈', cityPinYin: 'delingha', cityPY: 'dlh',key:'D',hot: false
  },
  { cityName: '德清', cityPinYin: 'deqing', cityPY: 'dq',key:'D',hot: false
  },
  { cityName: '德阳', cityPinYin: 'deyang', cityPY: 'dy',key:'D',hot: false
  },
  { cityName: '德州', cityPinYin: 'dezhou', cityPY: 'dz',key:'D',hot: false
  },
  { cityName: '定远', cityPinYin: 'dingyuan', cityPY: 'dy',key:'D',hot: false
  },
  { cityName: '东莞', cityPinYin: 'dongguan', cityPY: 'dg',key:'D',hot: false
  },
  { cityName: '东海县', cityPinYin: 'donghaixian', cityPY: 'dhx',key:'D',hot: false
  },
  { cityName: '东胜', cityPinYin: 'dongsheng', cityPY: 'ds',key:'D',hot: false
  },
  { cityName: '东营', cityPinYin: 'dongying', cityPY: 'dy',key:'D',hot: false
  },
  { cityName: '都江堰', cityPinYin: 'doujiangyan', cityPY: 'djy',key:'D',hot: false
  },
  { cityName: '敦煌', cityPinYin: 'dunhuang', cityPY: 'dh',key:'D',hot: false
  },
  { cityName: '额济纳', cityPinYin: 'ejina', cityPY: 'ejn',key:'E',hot: false
  },
  { cityName: '峨眉', cityPinYin: 'emei', cityPY: 'em',key:'E',hot: false
  },
  { cityName: '恩施', cityPinYin: 'enshi', cityPY: 'es',key:'E',hot: false
  },
  { cityName: '鄂州', cityPinYin: 'ezhou', cityPY: 'ez',key:'E',hot: false
  },
  { cityName: '佛山', cityPinYin: 'foshan', cityPY: 'fs',key:'F',hot: false
  },
  { cityName: '福安', cityPinYin: 'fuan', cityPY: 'fa',key:'F',hot: false
  },
  { cityName: '福鼎', cityPinYin: 'fuding', cityPY: 'fd',key:'F',hot: false
  },
  { cityName: '涪陵', cityPinYin: 'fuling', cityPY: 'fl',key:'F',hot: false
  },
  { cityName: '福清', cityPinYin: 'fuqing', cityPY: 'fq',key:'F',hot: false
  },
  { cityName: '抚顺', cityPinYin: 'fushun', cityPY: 'fs',key:'F',hot: false
  },
  { cityName: '阜新', cityPinYin: 'fuxin', cityPY: 'fx',key:'F',hot: false
  },
  { cityName: '阜阳', cityPinYin: 'fuyang', cityPY: 'fy',key:'F',hot: false
  },
  { cityName: '抚州', cityPinYin: 'fuzhou', cityPY: 'fz',key:'F',hot: false
  },
  { cityName: '福州', cityPinYin: 'fuzhou', cityPY: 'fz',key:'F',hot: false
  },
  { cityName: '赣州', cityPinYin: 'ganzhou', cityPY: 'gz',key:'G',hot: false
  },
  { cityName: '高密', cityPinYin: 'gaomi', cityPY: 'gm',key:'G',hot: false
  },
  { cityName: '格尔木', cityPinYin: 'geermu', cityPY: 'gem',key:'G',hot: false
  },
  { cityName: '广安', cityPinYin: 'guangan', cityPY: 'ga',key:'G',hot: false
  },
  { cityName: '广元', cityPinYin: 'guangyuan', cityPY: 'gy',key:'G',hot: false
  },
  { cityName: '广州', cityPinYin: 'guangzhou', cityPY: 'gz',key:'G',hot: true
  },
  { cityName: '桂林', cityPinYin: 'guilin', cityPY: 'gl',key:'G',hot: false
  },
  { cityName: '贵阳', cityPinYin: 'guiyang', cityPY: 'gy',key:'G',hot: false
  },
  { cityName: '哈尔滨', cityPinYin: 'haerbin', cityPY: 'heb',key:'H',hot: false
  },
  { cityName: '海城', cityPinYin: 'haicheng', cityPY: 'hc',key:'H',hot: false
  },
  { cityName: '海口', cityPinYin: 'haikou', cityPY: 'hk',key:'H',hot: false
  },
  { cityName: '海拉尔', cityPinYin: 'hailaer', cityPY: 'hle',key:'H',hot: false
  },
  { cityName: '海宁', cityPinYin: 'haining', cityPY: 'hn',key:'H',hot: false
  },
  { cityName: '哈密', cityPinYin: 'hami', cityPY: 'hm',key:'H',hot: false
  },
  { cityName: '邯郸', cityPinYin: 'handan', cityPY: 'hd',key:'H',hot: false
  },
  { cityName: '杭州', cityPinYin: 'hangzhou', cityPY: 'hz',key:'H',hot: true
  },
  { cityName: '涵江', cityPinYin: 'hanjiang', cityPY: 'hj',key:'H',hot: false
  },
  { cityName: '汉中', cityPinYin: 'hanzhong', cityPY: 'hz',key:'H',hot: false
  },
  { cityName: '鹤壁', cityPinYin: 'hebi', cityPY: 'hb',key:'H',hot: false
  },
  { cityName: '合川', cityPinYin: 'hechuan', cityPY: 'hc',key:'H',hot: false
  },
  { cityName: '合肥', cityPinYin: 'hefei', cityPY: 'hf',key:'H',hot: false
  },
  { cityName: '鹤岗', cityPinYin: 'hegang', cityPY: 'hg',key:'H',hot: false
  },
  { cityName: '黑河', cityPinYin: 'heihe', cityPY: 'hh',key:'H',hot: false
  },
  { cityName: '衡山', cityPinYin: 'hengshan', cityPY: 'hs',key:'H',hot: false
  },
  { cityName: '衡水', cityPinYin: 'hengshui', cityPY: 'hs',key:'H',hot: false
  },
  { cityName: '衡阳', cityPinYin: 'hengyang', cityPY: 'hy',key:'H',hot: false
  },
  { cityName: '菏泽', cityPinYin: 'heze', cityPY: 'hz',key:'H',hot: false
  },
  { cityName: '淮安', cityPinYin: 'huaian', cityPY: 'ha',key:'H',hot: false
  },
  { cityName: '淮北', cityPinYin: 'huaibei', cityPY: 'hb',key:'H',hot: false
  },
  { cityName: '怀化', cityPinYin: 'huaihua', cityPY: 'hh',key:'H',hot: false
  },
  { cityName: '淮南', cityPinYin: 'huainan', cityPY: 'hn',key:'H',hot: false
  },
  { cityName: '黄山', cityPinYin: 'huangshan', cityPY: 'hs',key:'H',hot: false
  },
  { cityName: '黄石', cityPinYin: 'huangshi', cityPY: 'hs',key:'H',hot: false
  },
  { cityName: '呼和浩特', cityPinYin: 'huhehaote', cityPY: 'hhht',key:'H',hot: false
  },
  { cityName: '惠州', cityPinYin: 'huizhou', cityPY: 'hz',key:'H',hot: false
  },
  { cityName: '葫芦岛', cityPinYin: 'huludao', cityPY: 'hld',key:'H',hot: false
  },
  { cityName: '湖州', cityPinYin: 'huzhou', cityPY: 'hz',key:'H',hot: false
  },
  { cityName: '佳木斯', cityPinYin: 'jiamusi', cityPY: 'jms',key:'J',hot: false
  },
  { cityName: '吉安', cityPinYin: 'jian', cityPY: 'ja',key:'J',hot: false
  },
  { cityName: '江门', cityPinYin: 'jiangmen', cityPY: 'jm',key:'J',hot: false
  },
  { cityName: '江山', cityPinYin: 'jiangshan', cityPY: 'js',key:'J',hot: false
  },
  { cityName: '胶州', cityPinYin: 'jiaozhou', cityPY: 'jz',key:'J',hot: false
  },
  { cityName: '嘉善', cityPinYin: 'jiashan', cityPY: 'js',key:'J',hot: false
  },
  { cityName: '嘉兴', cityPinYin: 'jiaxing', cityPY: 'jx',key:'J',hot: false
  },
  { cityName: '嘉峪关', cityPinYin: 'jiayuguan', cityPY: 'jyg',key:'J',hot: false
  },
  { cityName: '揭阳', cityPinYin: 'jieyang', cityPY: 'jy',key:'J',hot: false
  },
  { cityName: '吉林', cityPinYin: 'jilin', cityPY: 'jl',key:'J',hot: false
  },
  { cityName: '济南', cityPinYin: 'jinan', cityPY: 'jn',key:'J',hot: false
  },
  { cityName: '晋城', cityPinYin: 'jincheng', cityPY: 'jc',key:'J',hot: false
  },
  { cityName: '景德镇', cityPinYin: 'jingdezhen', cityPY: 'jdz',key:'J',hot: false
  },
  { cityName: '荆门', cityPinYin: 'jingmen', cityPY: 'jm',key:'J',hot: false
  },
  { cityName: '荆州', cityPinYin: 'jingzhou', cityPY: 'jz',key:'J',hot: false
  },
  { cityName: '金华', cityPinYin: 'jinhua', cityPY: 'jh',key:'J',hot: false
  },
  { cityName: '集宁', cityPinYin: 'jining', cityPY: 'jn',key:'J',hot: false
  },
  { cityName: '济宁', cityPinYin: 'jining', cityPY: 'jn',key:'J',hot: false
  },
  { cityName: '晋江', cityPinYin: 'jinjiang', cityPY: 'jj',key:'J',hot: false
  },
  { cityName: '锦州', cityPinYin: 'jinzhou', cityPY: 'jz',key:'J',hot: false
  },
  { cityName: '吉首', cityPinYin: 'jishou', cityPY: 'js',key:'J',hot: false
  },
  { cityName: '九江', cityPinYin: 'jiujiang', cityPY: 'jj',key:'J',hot: false
  },
  { cityName: '酒泉', cityPinYin: 'jiuquan', cityPY: 'jq',key:'J',hot: false
  },
  { cityName: '鸡西', cityPinYin: 'jixi', cityPY: 'jx',key:'J',hot: false
  },
  { cityName: '开封', cityPinYin: 'kaifeng', cityPY: 'kf',key:'K',hot: false
  },
  { cityName: '凯里', cityPinYin: 'kaili', cityPY: 'kl',key:'K',hot: false
  },
  { cityName: '喀什', cityPinYin: 'kashen', cityPY: 'ks',key:'K',hot: false
  },
  { cityName: '库尔勒', cityPinYin: 'kuerle', cityPY: 'kel',key:'K',hot: false
  },
  { cityName: '昆明', cityPinYin: 'kunming', cityPY: 'km',key:'K',hot: false
  },
  { cityName: '昆山', cityPinYin: 'kunshan', cityPY: 'ks',key:'K',hot: false
  },
  { cityName: '廊坊', cityPinYin: 'langfang', cityPY: 'lf',key:'I',hot: false
  },
  { cityName: '兰州', cityPinYin: 'lanzhou', cityPY: 'lz',key:'I',hot: false
  },
  { cityName: '拉萨', cityPinYin: 'lasa', cityPY: 'ls',key:'I',hot: false
  },
  { cityName: '耒阳', cityPinYin: 'leiyang', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '乐清', cityPinYin: 'leqing', cityPY: 'lq',key:'I',hot: false
  },
  { cityName: '梁平', cityPinYin: 'liangping', cityPY: 'lp',key:'I',hot: false
  },
  { cityName: '连江', cityPinYin: 'lianjiang', cityPY: 'lj',key:'I',hot: false
  },
  { cityName: '连云港', cityPinYin: 'lianyungang', cityPY: 'lyg',key:'I',hot: false
  },
  { cityName: '聊城', cityPinYin: 'liaocheng', cityPY: 'lc',key:'I',hot: false
  },
  { cityName: '辽阳', cityPinYin: 'liaoyang', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '辽源', cityPinYin: 'liaoyuan', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '丽江', cityPinYin: 'lijiang', cityPY: 'lj',key:'I',hot: false
  },
  { cityName: '临汾', cityPinYin: 'linfen', cityPY: 'lf',key:'I',hot: false
  },
  { cityName: '陵水', cityPinYin: 'lingshui', cityPY: 'ls',key:'I',hot: false
  },
  { cityName: '临海', cityPinYin: 'linhai', cityPY: 'lh',key:'I',hot: false
  },
  { cityName: '临河', cityPinYin: 'linhe', cityPY: 'lh',key:'I',hot: false
  },
  { cityName: '临沂', cityPinYin: 'linyi', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '六安', cityPinYin: 'liuan', cityPY: 'la',key:'I',hot: false
  },
  { cityName: '六盘水', cityPinYin: 'liupanshui', cityPY: 'lps',key:'I',hot: false
  },
  { cityName: '柳州', cityPinYin: 'liuzhou', cityPY: 'lz',key:'I',hot: false
  },
  { cityName: '溧阳', cityPinYin: 'liyang', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '龙岩', cityPinYin: 'longyan', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '龙游', cityPinYin: 'longyou', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '娄底', cityPinYin: 'loudi', cityPY: 'ld',key:'I',hot: false
  },
  { cityName: '吕梁', cityPinYin: 'lu:liang', cityPY: 'll',key:'I',hot: false
  },
  { cityName: '漯河', cityPinYin: 'luohe', cityPY: 'lh',key:'I',hot: false
  },
  { cityName: '洛阳', cityPinYin: 'luoyang', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '罗源', cityPinYin: 'luoyuan', cityPY: 'ly',key:'I',hot: false
  },
  { cityName: '庐山', cityPinYin: 'lushan', cityPY: 'ls',key:'I',hot: false
  },
  { cityName: '马鞍山', cityPinYin: 'maanshan', cityPY: 'mas',key:'M',hot: false
  },
  { cityName: '满洲里', cityPinYin: 'manzhouli', cityPY: 'mzl',key:'M',hot: false
  },
  { cityName: '美兰', cityPinYin: 'meilan', cityPY: 'ml',key:'M',hot: false
  },
  { cityName: '梅州', cityPinYin: 'meizhou', cityPY: 'mz',key:'M',hot: false
  },
  { cityName: '绵阳', cityPinYin: 'mianyang', cityPY: 'my',key:'M',hot: false
  },
  { cityName: '汨罗', cityPinYin: 'miluo', cityPY: 'ml',key:'M',hot: false
  },
  { cityName: '漠河', cityPinYin: 'mohe', cityPY: 'mh',key:'M',hot: false
  },
  { cityName: '牡丹江', cityPinYin: 'mudanjiang', cityPY: 'mdj',key:'M',hot: false
  },
  { cityName: '南昌', cityPinYin: 'nanchang', cityPY: 'nc',key:'N',hot: false
  },
  { cityName: '南城', cityPinYin: 'nancheng', cityPY: 'nc',key:'N',hot: false
  },
  { cityName: '南充', cityPinYin: 'nanchong', cityPY: 'nc',key:'N',hot: false
  },
  { cityName: '南丰', cityPinYin: 'nanfeng', cityPY: 'nf',key:'N',hot: false
  },
  { cityName: '南京', cityPinYin: 'nanjing', cityPY: 'nj',key:'N',hot: false
  },
  { cityName: '南宁', cityPinYin: 'nanning', cityPY: 'nn',key:'N',hot: false
  },
  { cityName: '南通', cityPinYin: 'nantong', cityPY: 'nt',key:'N',hot: false
  },
  { cityName: '南阳', cityPinYin: 'nanyang', cityPY: 'ny',key:'N',hot: false
  },
  { cityName: '内江', cityPinYin: 'neijiang', cityPY: 'nj',key:'N',hot: false
  },
  { cityName: '宁波', cityPinYin: 'ningbo', cityPY: 'nb',key:'N',hot: false
  },
  { cityName: '宁德', cityPinYin: 'ningde', cityPY: 'nd',key:'N',hot: false
  },
  { cityName: '宁海', cityPinYin: 'ninghai', cityPY: 'nh',key:'N',hot: false
  },
  { cityName: '盘锦', cityPinYin: 'panjin', cityPY: 'pj',key:'P',hot: false
  },
  { cityName: '攀枝花', cityPinYin: 'panzhihua', cityPY: 'pzh',key:'P',hot: false
  },
  { cityName: '平顶山', cityPinYin: 'pingdingshan', cityPY: 'pds',key:'P',hot: false
  },
  { cityName: '萍乡', cityPinYin: 'pingxiang', cityPY: 'px',key:'P',hot: false
  },
  { cityName: '平遥', cityPinYin: 'pingyao', cityPY: 'py',key:'P',hot: false
  },
  { cityName: '莆田', cityPinYin: 'putian', cityPY: 'pt',key:'P',hot: false
  },
  { cityName: '迁安', cityPinYin: 'qianan', cityPY: 'qa',key:'Q',hot: false
  },
  { cityName: '黔江', cityPinYin: 'qianjiang', cityPY: 'qj',key:'Q',hot: false
  },
  { cityName: '潜江', cityPinYin: 'qianjiang', cityPY: 'qj',key:'Q',hot: false
  },
  { cityName: '蕲春', cityPinYin: 'qichun', cityPY: 'qc',key:'Q',hot: false
  },
  { cityName: '青岛', cityPinYin: 'qingdao', cityPY: 'qd',key:'Q',hot: false
  },
  { cityName: '清远', cityPinYin: 'qingyuan', cityPY: 'qy',key:'Q',hot: false
  },
  { cityName: '青州市', cityPinYin: 'qingzhoushi', cityPY: 'qzs',key:'Q',hot: false
  },
  { cityName: '秦皇岛', cityPinYin: 'qinhuangdao', cityPY: 'qhd',key:'Q',hot: false
  },
  { cityName: '琼海', cityPinYin: 'qionghai', cityPY: 'qh',key:'Q',hot: false
  },
  { cityName: '齐齐哈尔', cityPinYin: 'qiqihaer', cityPY: 'qqhe',key:'Q',hot: false
  },
  { cityName: '七台河', cityPinYin: 'qitaihe', cityPY: 'qth',key:'Q',hot: false
  },
  { cityName: '泉州', cityPinYin: 'quanzhou', cityPY: 'qz',key:'Q',hot: false
  },
  { cityName: '曲阜', cityPinYin: 'qufu', cityPY: 'qf',key:'Q',hot: false
  },
  { cityName: '曲靖', cityPinYin: 'qujing', cityPY: 'qj',key:'Q',hot: false
  },
  { cityName: '渠县', cityPinYin: 'quxian', cityPY: 'qx',key:'Q',hot: false
  },
  { cityName: '衢州', cityPinYin: 'quzhou', cityPY: 'qz',key:'Q',hot: false
  },
  { cityName: '任丘', cityPinYin: 'renqiu', cityPY: 'rq',key:'R',hot: false
  },
  { cityName: '日照', cityPinYin: 'rizhao', cityPY: 'rz',key:'R',hot: false
  },
  { cityName: '如皋', cityPinYin: 'rugao', cityPY: 'rg',key:'R',hot: false
  },
  { cityName: '瑞安', cityPinYin: 'ruian', cityPY: 'ra',key:'R',hot: false
  },
  { cityName: '乳山', cityPinYin: 'rushan', cityPY: 'rs',key:'R',hot: false
  },
  { cityName: '三门峡', cityPinYin: 'sanmenxia', cityPY: 'smx',key:'S',hot: false
  },
  { cityName: '三门县', cityPinYin: 'sanmenxian', cityPY: 'smx',key:'S',hot: false
  },
  { cityName: '三明', cityPinYin: 'sanming', cityPY: 'sm',key:'S',hot: false
  },
  { cityName: '三亚', cityPinYin: 'sanya', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '厦门', cityPinYin: 'shamen', cityPY: 'sm',key:'S',hot: false
  },
  { cityName: '上海', cityPinYin: 'shanghai', cityPY: 'sh',key:'S',hot: true
  },
  { cityName: '商丘', cityPinYin: 'shangqiu', cityPY: 'sq',key:'S',hot: false
  },
  { cityName: '上饶', cityPinYin: 'shangrao', cityPY: 'sr',key:'S',hot: false
  },
  { cityName: '上虞', cityPinYin: 'shangyu', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '山海关', cityPinYin: 'shanhaiguan', cityPY: 'shg',key:'S',hot: false
  },
  { cityName: '汕头', cityPinYin: 'shantou', cityPY: 'st',key:'S',hot: false
  },
  { cityName: '韶关', cityPinYin: 'shaoguan', cityPY: 'sg',key:'S',hot: false
  },
  { cityName: '绍兴', cityPinYin: 'shaoxing', cityPY: 'sx',key:'S',hot: false
  },
  { cityName: '邵阳', cityPinYin: 'shaoyang', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '神木', cityPinYin: 'shenmu', cityPY: 'sm',key:'S',hot: false
  },
  { cityName: '沈阳', cityPinYin: 'shenyang', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '深圳', cityPinYin: 'shenzhen', cityPY: 'sz',key:'S',hot: true
  },
  { cityName: '石家庄', cityPinYin: 'shijiazhuang', cityPY: 'sjz',key:'S',hot: false
  },
  { cityName: '十堰', cityPinYin: 'shiyan', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '双鸭山', cityPinYin: 'shuangyashan', cityPY: 'sys',key:'S',hot: false
  },
  { cityName: '四平', cityPinYin: 'siping', cityPY: 'sp',key:'S',hot: false
  },
  { cityName: '松江', cityPinYin: 'songjiang', cityPY: 'sj',key:'S',hot: false
  },
  { cityName: '松原', cityPinYin: 'songyuan', cityPY: 'sy',key:'S',hot: false
  },
  { cityName: '松滋', cityPinYin: 'songzi', cityPY: 'sz',key:'S',hot: false
  },
  { cityName: '绥德', cityPinYin: 'suide', cityPY: 'sd',key:'S',hot: false
  },
  { cityName: '绥芬河', cityPinYin: 'suifenhe', cityPY: 'sfh',key:'S',hot: false
  },
  { cityName: '遂宁', cityPinYin: 'suining', cityPY: 'sn',key:'S',hot: false
  },
  { cityName: '随州', cityPinYin: 'suizhou', cityPY: 'sz',key:'S',hot: false
  },
  { cityName: '苏州', cityPinYin: 'suzhou', cityPY: 'sz',key:'S',hot: false
  },
  { cityName: '宿州', cityPinYin: 'suzhou', cityPY: 'sz',key:'S',hot: false
  },
  { cityName: '泰安', cityPinYin: 'taian', cityPY: 'ta',key:'T',hot: false
  },
  { cityName: '台安', cityPinYin: 'taian', cityPY: 'ta',key:'T',hot: false
  },
  { cityName: '泰宁', cityPinYin: 'taining', cityPY: 'tn',key:'T',hot: false
  },
  { cityName: '太原', cityPinYin: 'taiyuan', cityPY: 'ty',key:'T',hot: false
  },
  { cityName: '台州', cityPinYin: 'taizhou', cityPY: 'tz',key:'T',hot: false
  },
  { cityName: '泰州', cityPinYin: 'taizhou', cityPY: 'tz',key:'T',hot: false
  },
  { cityName: '唐山', cityPinYin: 'tangshan', cityPY: 'ts',key:'T',hot: false
  },
  { cityName: '滕州', cityPinYin: 'tengzhou', cityPY: 'tz',key:'T',hot: false
  },
  { cityName: '天津', cityPinYin: 'tianjin', cityPY: 'tj',key:'T',hot: true
  },
  { cityName: '天门', cityPinYin: 'tianmen', cityPY: 'tm',key:'T',hot: false
  },
  { cityName: '天水', cityPinYin: 'tianshui', cityPY: 'ts',key:'T',hot: false
  },
  { cityName: '铁岭', cityPinYin: 'tieling', cityPY: 'tl',key:'T',hot: false
  },
  { cityName: '桐城', cityPinYin: 'tongcheng', cityPY: 'tc',key:'T',hot: false
  },
  { cityName: '通化', cityPinYin: 'tonghua', cityPY: 'th',key:'T',hot: false
  },
  { cityName: '通辽', cityPinYin: 'tongliao', cityPY: 'tl',key:'T',hot: false
  },
  { cityName: '铜陵', cityPinYin: 'tongling', cityPY: 'tl',key:'T',hot: false
  },
  { cityName: '铜仁', cityPinYin: 'tongren', cityPY: 'tr',key:'T',hot: false
  },
  { cityName: '桐乡', cityPinYin: 'tongxiang', cityPY: 'tx',key:'T',hot: false
  },
  { cityName: '吐鲁番', cityPinYin: 'tulufan', cityPY: 'tlf',key:'T',hot: false
  },
  { cityName: '瓦房店', cityPinYin: 'wafangdian', cityPY: 'wfd',key:'W',hot: false
  },
  { cityName: '万宁', cityPinYin: 'wanning', cityPY: 'wn',key:'W',hot: false
  },
  { cityName: '万源', cityPinYin: 'wanyuan', cityPY: 'wy',key:'W',hot: false
  },
  { cityName: '万州', cityPinYin: 'wanzhou', cityPY: 'wz',key:'W',hot: false
  },
  { cityName: '潍坊', cityPinYin: 'weifang', cityPY: 'wf',key:'W',hot: false
  },
  { cityName: '威海', cityPinYin: 'weihai', cityPY: 'wh',key:'W',hot: false
  },
  { cityName: '渭南', cityPinYin: 'weinan', cityPY: 'wn',key:'W',hot: false
  },
  { cityName: '文昌', cityPinYin: 'wenchang', cityPY: 'wc',key:'W',hot: false
  },
  { cityName: '温岭', cityPinYin: 'wenling', cityPY: 'wl',key:'W',hot: false
  },
  { cityName: '温州', cityPinYin: 'wenzhou', cityPY: 'wz',key:'W',hot: false
  },
  { cityName: '乌海', cityPinYin: 'wuhai', cityPY: 'wh',key:'W',hot: false
  },
  { cityName: '武汉', cityPinYin: 'wuhan', cityPY: 'wh',key:'W',hot: true
  },
  { cityName: '芜湖', cityPinYin: 'wuhu', cityPY: 'wh',key:'W',hot: false
  },
  { cityName: '乌兰浩特', cityPinYin: 'wulanhaote', cityPY: 'wlht',key:'W',hot: false
  },
  { cityName: '武隆', cityPinYin: 'wulong', cityPY: 'wl',key:'W',hot: false
  },
  { cityName: '乌鲁木齐', cityPinYin: 'wulumuqi', cityPY: 'wlmq',key:'W',hot: false
  },
  { cityName: '武清', cityPinYin: 'wuqing', cityPY: 'wq',key:'W',hot: false
  },
  { cityName: '武威', cityPinYin: 'wuwei', cityPY: 'ww',key:'W',hot: false
  },
  { cityName: '无锡', cityPinYin: 'wuxi', cityPY: 'wx',key:'W',hot: false
  },
  { cityName: '武夷山', cityPinYin: 'wuyishan', cityPY: 'wys',key:'W',hot: false
  },
  { cityName: '婺源', cityPinYin: 'wuyuan', cityPY: 'wy',key:'W',hot: false
  },
  { cityName: '西安', cityPinYin: 'xian', cityPY: 'xa',key:'X',hot: true
  },
  { cityName: '襄阳', cityPinYin: 'xiangyang', cityPY: 'xy',key:'X',hot: false
  },
  { cityName: '咸宁', cityPinYin: 'xianning', cityPY: 'xn',key:'X',hot: false
  },
  { cityName: '孝感', cityPinYin: 'xiaogan', cityPY: 'xg',key:'X',hot: false
  },
  { cityName: '霞浦', cityPinYin: 'xiapu', cityPY: 'xp',key:'X',hot: false
  },
  { cityName: '西昌', cityPinYin: 'xichang', cityPY: 'xc',key:'X',hot: false
  },
  { cityName: '锡林浩特', cityPinYin: 'xilinhaote', cityPY: 'xlht',key:'X',hot: false
  },
  { cityName: '邢台', cityPinYin: 'xingtai', cityPY: 'xt',key:'X',hot: false
  },
  { cityName: '西宁', cityPinYin: 'xining', cityPY: 'xn',key:'X',hot: false
  },
  { cityName: '新乡', cityPinYin: 'xinxiang', cityPY: 'xx',key:'X',hot: false
  },
  { cityName: '信阳', cityPinYin: 'xinyang', cityPY: 'xy',key:'X',hot: false
  },
  { cityName: '新余', cityPinYin: 'xinyu', cityPY: 'xy',key:'X',hot: false
  },
  { cityName: '忻州', cityPinYin: 'xinzhou', cityPY: 'xz',key:'X',hot: false
  },
  { cityName: '许昌', cityPinYin: 'xuchang', cityPY: 'xc',key:'X',hot: false
  },
  { cityName: '徐州', cityPinYin: 'xuzhou', cityPY: 'xz',key:'X',hot: false
  },
  { cityName: '延安', cityPinYin: 'yanan', cityPY: 'ya',key:'Y',hot: false
  },
  { cityName: '盐城', cityPinYin: 'yancheng', cityPY: 'yc',key:'Y',hot: false
  },
  { cityName: '阳泉', cityPinYin: 'yangquan', cityPY: 'yq',key:'Y',hot: false
  },
  { cityName: '扬州', cityPinYin: 'yangzhou', cityPY: 'yz',key:'Y',hot: false
  },
  { cityName: '延吉', cityPinYin: 'yanji', cityPY: 'yj',key:'Y',hot: false
  },
  { cityName: '烟台', cityPinYin: 'yantai', cityPY: 'yt',key:'Y',hot: false
  },
  { cityName: '宜宾', cityPinYin: 'yibin', cityPY: 'yb',key:'Y',hot: false
  },
  { cityName: '宜昌', cityPinYin: 'yichang', cityPY: 'yc',key:'Y',hot: false
  },
  { cityName: '宜春', cityPinYin: 'yichun', cityPY: 'yc',key:'Y',hot: false
  },
  { cityName: '银川', cityPinYin: 'yinchuan', cityPY: 'yc',key:'Y',hot: false
  },
  { cityName: '英德', cityPinYin: 'yingde', cityPY: 'yd',key:'Y',hot: false
  },
  { cityName: '营口', cityPinYin: 'yingkou', cityPY: 'yk',key:'Y',hot: false
  },
  { cityName: '营山', cityPinYin: 'yingshan', cityPY: 'ys',key:'Y',hot: false
  },
  { cityName: '鹰潭', cityPinYin: 'yingtan', cityPY: 'yt',key:'Y',hot: false
  },
  { cityName: '义乌', cityPinYin: 'yiwu', cityPY: 'yw',key:'Y',hot: false
  },
  { cityName: '宜兴', cityPinYin: 'yixing', cityPY: 'yx',key:'Y',hot: false
  },
  { cityName: '益阳', cityPinYin: 'yiyang', cityPY: 'yy',key:'Y',hot: false
  },
  { cityName: '永嘉', cityPinYin: 'yongjia', cityPY: 'yj',key:'Y',hot: false
  },
  { cityName: '永州', cityPinYin: 'yongzhou', cityPY: 'yz',key:'Y',hot: false
  },
  { cityName: '尤溪', cityPinYin: 'youxi', cityPY: 'yx',key:'Y',hot: false
  },
  { cityName: '岳阳', cityPinYin: 'yueyang', cityPY: 'yy',key:'Y',hot: false
  },
  { cityName: '余杭', cityPinYin: 'yuhang', cityPY: 'yh',key:'Y',hot: false
  },
  { cityName: '榆林', cityPinYin: 'yulin', cityPY: 'yl',key:'Y',hot: false
  },
  { cityName: '运城', cityPinYin: 'yuncheng', cityPY: 'yc',key:'Y',hot: false
  },
  { cityName: '余姚', cityPinYin: 'yuyao', cityPY: 'yy',key:'Y',hot: false
  },
  { cityName: '枣阳', cityPinYin: 'zaoyang', cityPY: 'zy',key:'Z',hot: false
  },
  { cityName: '枣庄', cityPinYin: 'zaozhuang', cityPY: 'zz',key:'Z',hot: false
  },
  { cityName: '长春', cityPinYin: 'zhangchun', cityPY: 'zc',key:'Z',hot: false
  },
  { cityName: '张家界', cityPinYin: 'zhangjiajie', cityPY: 'zjj',key:'Z',hot: false
  },
  { cityName: '张家口', cityPinYin: 'zhangjiakou', cityPY: 'zjk',key:'Z',hot: false
  },
  { cityName: '章丘', cityPinYin: 'zhangqiu', cityPY: 'zq',key:'Z',hot: false
  },
  { cityName: '长沙', cityPinYin: 'zhangsha', cityPY: 'zs',key:'Z',hot: false
  },
  { cityName: '张掖', cityPinYin: 'zhangye', cityPY: 'zy',key:'Z',hot: false
  },
  { cityName: '长治', cityPinYin: 'zhangzhi', cityPY: 'zz',key:'Z',hot: false
  },
  { cityName: '漳州', cityPinYin: 'zhangzhou', cityPY: 'zz',key:'Z',hot: false
  },
  { cityName: '湛江', cityPinYin: 'zhanjiang', cityPY: 'zj',key:'Z',hot: false
  },
  { cityName: '昭通', cityPinYin: 'zhaotong', cityPY: 'zt',key:'Z',hot: false
  },
  { cityName: '郑州', cityPinYin: 'zhengzhou', cityPY: 'zz',key:'Z',hot: false
  },
  { cityName: '镇江', cityPinYin: 'zhenjiang', cityPY: 'zj',key:'Z',hot: false
  },
  { cityName: '镇远', cityPinYin: 'zhenyuan', cityPY: 'zy',key:'Z',hot: false
  },
  { cityName: '织金', cityPinYin: 'zhijin', cityPY: 'zj',key:'Z',hot: false
  },
  { cityName: '重庆', cityPinYin: 'zhongqing', cityPY: 'zq',key:'Z',hot: false
  },
  { cityName: '中山', cityPinYin: 'zhongshan', cityPY: 'zs',key:'Z',hot: false
  },
  { cityName: '中卫', cityPinYin: 'zhongwei', cityPY: 'zw',key:'Z',hot: false
  },
  { cityName: '钟祥', cityPinYin: 'zhongxiang', cityPY: 'zx',key:'Z',hot: false
  },
  { cityName: '周口', cityPinYin: 'zhoukou', cityPY: 'zk',key:'Z',hot: false
  },
  { cityName: '珠海', cityPinYin: 'zhuhai', cityPY: 'zh',key:'Z',hot: false
  },
  { cityName: '诸暨', cityPinYin: 'zhuji', cityPY: 'zj',key:'Z',hot: false
  },
  { cityName: '驻马店', cityPinYin: 'zhumadian', cityPY: 'zmd',key:'Z',hot: false
  },
  { cityName: '株洲', cityPinYin: 'zhuzhou', cityPY: 'zz',key:'Z',hot: false
  },
  { cityName: '淄博', cityPinYin: 'zibo', cityPY: 'zb',key:'Z',hot: false
  },
  { cityName: '遵义', cityPinYin: 'zunyi', cityPY: 'zy',key:'Z',hot: false
  }
]
    },
    onLoad: function (prama) {
        this.setData({
            position: app.globalData.positionCity,
            recent: wx.getStorageSync('recity') || [],
            current: prama.city
        })
      var that = this
      var citys = [];
      var fons = ['热门城市', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H','I','J', 'K', 'L', 'M','N','O','P', 'Q', 'R', 'S', 'T','U','V', 'W', 'X', 'Y', 'Z']
      var tfons = [];
      for (var i = 0;i<fons.length;i++){
        var fon = fons[i];
        var city = { fon: fon, citys:[]};
        for (var j = 0; j < that.data.citys.length;j++){
          var tcity = that.data.citys[j];
          if (fon == "热门城市" && tcity.hot){
            city.citys.push(tcity);
          }
          if (tcity.key.toUpperCase() == fon.toUpperCase()){
            city.citys.push(tcity);
          }
        }
        if (city.citys.length > 0){
          citys.push(city);
          i == 0 ? tfons.push("热门") : tfons.push(fon.toUpperCase())
        }
      }
      this.setData({ li: citys, fons: tfons});
      console.log(citys);
    },
    selcity: function (ev) {
        console.log(ev);
        var tar = ev.target.dataset.set;
        if (tar) {

            var recity = wx.getStorageSync('recity') || []
            if (recity[0] != tar) { recity.unshift(tar) }
            var nowrecity = recity.slice(0, 2)
            wx.setStorageSync('recity', nowrecity)
            wx.navigateBack();
        }
    },

    scrollto: function (ev) {
        console.log(ev)
        var tar = ev.target.dataset.to
        if (tar) {
            this.setData({
                scrollId: tar
            })
        }
    },
    bindSarchInput: function (e) {
        wx.pageScrollTo({
          scrollTop: 0,
          duration: 0
        })
    
        var inputVal = e.detail.value;
        var cityResultsTemp = new Array()
        var citys = this.data.citys;
    
        if (inputVal == null || inputVal.trim() == '') {
          this.setData({
            showSarch: false
          })
          return;
        }
    
        for (var i = 0; i < citys.length; i++) {
          if (citys[i].cityName.indexOf(inputVal) == 0 || citys[i].cityPY.indexOf(inputVal.toLowerCase()) == 0 || citys[i].cityPinYin.indexOf(inputVal.toLowerCase()) == 0) {
            var ifHas = false;
            for (var j = 0; j < cityResultsTemp.length; j++) {
              if (cityResultsTemp[j] == citys[i]) {
                ifHas = true;
                break;
              }
            }
            if (!ifHas) {
              cityResultsTemp.push(citys[i]);
            }
          }
        }
        this.setData({
            showSarch: true,
            sarchCitys: cityResultsTemp
        })
      }
})